package DataStructure.set.HashSet;

import java.util.HashSet;
import java.util.Set;

public class HashSetTest2 {
    public static void main(String[] args) {
        Set<User> set = new HashSet<>();

        User user1 = new User("jing", 18);
        User user2 = new User("jing", 18);

        set.add(user1);
        set.add(user2);

        System.out.println(user1.hashCode());
        System.out.println(user2.hashCode());

        for (User user : set) {
            System.out.println(user);
        }
    }
}
